/*
 * httphandle.h
 *
 *  Created on: Apr 17, 2009
 *      Author: kuncai
 */

#ifndef HTTPHANDLE_H_
#define HTTPHANDLE_H_
#include "httprequest.h"
#include "httpresponse.h"
#include "log.h"
#include <errno.h>
class HttpHandle{
	public:
		HttpHandle();
		~HttpHandle();
		void HandleRequest(HttpRequest* httpRequest, HttpResponse* httpResponse);
		virtual	 void ProcessRequest(HttpRequest* httpRequest, HttpResponse* httpResponse)=0;
		void SetSuccessor(HttpHandle* httpHandle);
		void SetError(HttpHandle* httpHandle);
	protected:
		HttpHandle* successor;
		HttpHandle* error;
};

#endif /* HTTPHANDLE_H_ */
